<!DOCTYPE html>
<html lang="en">
<head>
    <script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.3.min.js"></script>
    <script>
        $(document).ready(function () {
            $("button").click(function () {
                $("#bd").attr(
                    "href", "https://163.com",
                    "title", "网易",
                );
            });
        });
    </script>
    <title>attr修改属性</title>
</head>
<meta charset="UTF-8">
<body>
<p><a href="https://www.baidu.com" id="bd">百度</a></p>
<button>改变 href及title 值</button>
<p>请把鼠标指针移动到链接上，或者点击该链接，来查看已经改变的 href 值。</p>
</body>
</html>